<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>美食分享平台</title>
    <link th:href="@{/webjars/bootstrap/4.0.0/css/bootstrap.css}" rel="stylesheet">
    <link th:href="@{/asserts/css/FoodShare.css}" rel="stylesheet">
    <!-- layui -->
    <link rel="stylesheet" href="https://www.layuicdn.com/layui/css/layui.css">
    <script src="https://www.layuicdn.com/layui/layui.js"></script>
</head>
<body>
<!--引入抽取的topbar-->
<div th:replace="common/topbar::topbar"></div>

<div class="container-fluid">
    <div class="row">
        <!--引入侧边栏-->
        <div th:replace="common/sidebar::sidebar(active='news')"></div>
        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <form action="/foodshare/news/saveNews" method="post">
                <input type="hidden" name="newsId" th:value="${news.newsId}">
                <div class="form-group">
                    <label>资讯标题</label>
                    <input class="form-control" rows="3" name="newsTitle" th:value="${news.newsTitle}">
                </div>
                <div class="form-group">
                    <label>资讯内容</label>
                    <textarea class="form-control" rows="3" name="newsDetail" th:text="${news.newsDetail}"></textarea>
                </div>
                <label>点击修改图片</label>
                <div style="width: 200px;height: 200px;font-size: 15px;text-align: center;background: #EEEEEE url(/foodshare/main/img/add.png) no-repeat center;">
                    <img data-anim="layui-anim-scaleSpring" class="layui-upload layui-anim" id="upload_img"
                         style="width: 200px;height: 200px"
                    th:src="${news.newsImage}">
                    <input type="hidden" class="image" name="newsImage">
                </div>
                <button style="margin-top: 20px" class="btn btn-primary" type="submit">修改</button>
            </form>
        </main>
    </div>
</div>
<script th:src="@{/asserts/js/layui.js}"></script>
</body>
</html>